package com.hqbzl.chat.factory;

import java.util.stream.IntStream;

import com.hqbzl.chat.service.Session;
import com.hqbzl.chat.service.UserService;
import com.hqbzl.chat.service.impl.UserServiceImpl;

public class Factory {
    public static UserService userService = Create.createUserService();

    static class Create {
        public static UserService createUserService() {
            return new UserServiceImpl();
        }
    }


    public static void main(String[] args) {
        IntStream.range(0, 10).forEach(x -> {
            final UserService inst = Factory.userService;
            System.out.println("inst = " + inst);
        });
    }
}
